package simtester.server

class InstanceController {

    def list() {
        if (needsAuth()) { return }
        [instances: Instance.list(), activeView: 'instances']
    }
    
    private boolean needsAuth() {
        if (!session.user) {
            redirect (controller: 'user', action: 'index')
            return true
        }
        return false
    }
}
